package com.cqndt.site.util;

import org.apache.shiro.crypto.hash.SimpleHash;

public class EncodePasswordUtil {
    /**  加密算法 */
    public final static String hashAlgorithmName = "SHA-256";
    /**  循环次数 */
    public final static int hashIterations = 16;

    public static String sha256(String password, String salt) {
        return new SimpleHash(hashAlgorithmName, password, salt, hashIterations).toString();
    }
    public static void main(String[] args) {
        //String salt = RandomStringUtils.randomAlphanumeric(20);
        System.out.println(sha256("didiao03","zb6nDRiHWHAmo8qUMgxw"));
    }

}
